angular.module('starter.services', []) 

.factory('Chats', ['$http',function($http) {//请求服务		
		var music = function(ev){
	   		return $http.get("/wyy/v1/restserver/ting?" + ev)
	   		.success(function(res){
					return res
			})
		};
		return{
			music : music
		}
}])
.directive('hideTabs', function($rootScope) {
    return {
        restrict: 'A',
        link: function(scope, element, attributes) {
            scope.$on('$ionicView.beforeEnter', function() {
                scope.$watch(attributes.hideTabs, function(value){
                    $rootScope.hideTabs = value;
                });
            });

            scope.$on('$ionicView.beforeLeave', function() {
                $rootScope.hideTabs = false;
            });
        }
    };
});